#include<iostream>
#include<limits>
using namespace std;

// main() 是程序开始执行的地方
namespace test1 {
	int main2()
	{
		/*cout << "char的：\t最大值：" << numeric_limits<char>::max << endl;*/
		cout << "type: \t\t" << "*********************************size****************************" << endl;
		cout << "bool: \t\t 所占字节：" << sizeof(bool);
		cout << "\t最大值：" << (numeric_limits<bool>::max)();
		cout << "\t\t最小值：" << (numeric_limits<bool>::min)() << endl;

		cout << "char: \t\t 所占字节：" << sizeof(char) << endl;
		// char没定义有符号还是无符号，故无法有效输出
		// cout << "\t最大值：" << (numeric_limits<char>::max)();
		// cout << "\t\t最小值：" << (numeric_limits<char>::min)() << endl;

		cout << "signed char: \t\t 所占字节：" << sizeof(signed char) << endl;
		// cout << "\t最大值：" << (numeric_limits<signed char>::max)();
		// cout << "\t\t最小值：" << (numeric_limits<signed char>::min)() << endl;

		cout << "unsigned char: \t\t 所占字节：" << sizeof(unsigned char) << endl;
		//cout << "\t最大值：" << (numeric_limits<unsigned char>::max)();
		//cout << "\t\t最小值：" << (numeric_limits<unsigned char>::min)() << endl;

		cout << "wchar_t: \t\t 所占字节：" << sizeof(wchar_t);
		cout << "\t最大值：" << (numeric_limits<wchar_t>::max)();
		cout << "\t\t最小值：" << (numeric_limits<wchar_t>::min)() << endl;

		cout << "short: \t\t 所占字节：" << sizeof(short);
		cout << "\t最大值：" << (numeric_limits<short>::max)();
		cout << "\t\t最小值：" << (numeric_limits<short>::min)() << endl;

		cout << "int: \t\t 所占字节：" << sizeof(int);
		cout << "\t最大值：" << (numeric_limits<int>::max)();
		cout << "\t\t最小值：" << (numeric_limits<int>::min)() << endl;

		cout << "unsigned: \t\t 所占字节：" << sizeof(unsigned);
		cout << "\t最大值：" << (numeric_limits<unsigned>::max)();
		cout << "\t\t最小值：" << (numeric_limits<unsigned>::min)() << endl;

		cout << "long: \t\t 所占字节：" << sizeof(long);
		cout << "\t最大值：" << (numeric_limits<long>::max)();
		cout << "\t\t最小值：" << (numeric_limits<long>::min)() << endl;

		cout << "unsigned long: \t\t 所占字节：" << sizeof(unsigned long);
		cout << "\t最大值：" << (numeric_limits<unsigned long>::max)();
		cout << "\t\t最小值：" << (numeric_limits<unsigned long>::min)() << endl;

		cout << "double: \t\t 所占字节：" << sizeof(double);
		cout << "\t最大值：" << (numeric_limits<double>::max)();
		cout << "\t\t最小值：" << (numeric_limits<double>::min)() << endl;

		cout << "long double: \t\t 所占字节：" << sizeof(long double);
		cout << "\t最大值：" << (numeric_limits<long double>::max)();
		cout << "\t\t最小值：" << (numeric_limits<long double>::min)() << endl;

		cout << "float: \t\t 所占字节：" << sizeof(float);
		cout << "\t最大值：" << (numeric_limits<float>::max)();
		cout << "\t\t最小值：" << (numeric_limits<float>::min)() << endl;

		cout << "size_t: \t\t 所占字节：" << sizeof(size_t);
		cout << "\t最大值：" << (numeric_limits<size_t>::max)();
		cout << "\t\t最小值：" << (numeric_limits<size_t>::min)() << endl;

		cout << "string: \t\t 所占字节：" << sizeof(string);
		// string 也是不定长的
		cout << "\t最大值：" << (numeric_limits<string>::max)();
		cout << "\t\t最小值：" << (numeric_limits<string>::min)() << endl;
		cout << "type: \t\t" << "*********************************size****************************" << endl;
		return 0;
	}
}